//
//  KURLLoader.h
//  Ghac 4S
//
//  Created by apple on 11-8-26.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#pragma once

#define KLOADER_COMPLETE    @"kloader_complete"
#define KLOADER_PROCESS     @"kloader_process"
#define KLOADER_BEGIN       @"kloader_begin"
#define KLOADER_ERROR       @"kloader_error"

@class KURLRequest;
@interface KURLLoader : NSObject <NSURLConnectionDelegate>
{
    NSMutableDictionary*    m_eventList;
    NSMutableData*          m_data;
    id                      m_delegate;
    
}

@property (nonatomic, retain)   NSMutableData* data;
-(void)                         load:(KURLRequest*) request;
-(void)                         addEventListener:(NSString*)type sector:(SEL)function;
-(id)                           initWithDelegate:(id)delegate;

@end
